﻿@{
    ViewBag.Title = "yxg";
    Layout = "~/Views/Shared/_LayoutPage1.cshtml";
}

<h2>yxg</h2>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width" />
    <title>yxg</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>

    <link href="~/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css" rel="stylesheet" />
    <link href="~/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" />
    <link href="~/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet" />
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->





</head>
<div>
    <table style="padding-top:220px;margin:0 auto; width:752px">
        <thead>
            <tr class="alert-success">
               
                <th>医院名称</th>
                <th>医院信息</th>
                <th>医院电话</th>
               

            </tr>
        </thead>
        <tbody id="showData" class="alert-info" style="color:#ff0000"></tbody>
    </table>
</div>
<script>
 $.ready(showData());
    //显示
    function showData()
    {
        $.ajax({
            url: "http://localhost:13936/actionapi/values/showhospital",
            type: "get",
            dataType: "json",
            success: function (data)
            {   var str = "";
                for (var i = 0; i < data.length; i++)
                {
                    str += " <tr> ";
                     str += "  <th>" + data[i].hname + "</th>";
                     str += "  <th>" + data[i].hremark + "</th>";
                     str += " <th>" + data[i].htel + "</th>";
   
                      str += "  </tr>";
                }
                $("#showData").html(str);
            }
        })
        }
</script>